/* 连连看游戏样式 */

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
}

.game-main {
    flex: 1;
}

.game-sidebar {
    width: 300px;
}

/* 游戏信息卡片 */
.game-info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-info-title {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-item {
    text-align: center;
}

.info-value {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.info-label {
    font-size: 13px;
    color: #666;
}

/* 计时器特殊样式 */
.timer-value {
    font-size: 36px;
    font-weight: bold;
    color: #67c23a;
}

.timer-value.warning {
    color: #e6a23c;
    animation: pulse 1s infinite;
}

.timer-value.danger {
    color: #f56c6c;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 游戏棋盘 */
.game-board-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.game-board {
    display: grid;
    gap: 8px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-tile {
    aspect-ratio: 1;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    user-select: none;
}

.game-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.game-tile.selected {
    background: linear-gradient(145deg, #667eea, #764ba2);
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
    animation: selectPulse 0.5s ease;
}

.game-tile.matched {
    animation: matchAnimation 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.game-tile.hint {
    animation: hintPulse 1s infinite;
}

.game-tile.empty {
    background: transparent;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

@keyframes selectPulse {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.15); }
}

@keyframes matchAnimation {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3) rotate(180deg); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes hintPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(103, 194, 58, 0.7); }
    50% { box-shadow: 0 0 20px 10px rgba(103, 194, 58, 0); }
}

/* 道具栏 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tool-btn {
    padding: 12px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.tool-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tool-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.tool-icon {
    font-size: 18px;
}

/* 游戏控制按钮 */
.game-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.control-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-pause {
    background: #e6a23c;
    color: #fff;
}

.btn-restart {
    background: #67c23a;
    color: #fff;
}

.btn-quit {
    background: #f56c6c;
    color: #fff;
}

/* 游戏结果弹窗 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.game-modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-title.success {
    color: #67c23a;
}

.modal-title.fail {
    color: #f56c6c;
}

.result-stats {
    background: #f5f7fa;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 16px;
}

.result-label {
    color: #666;
}

.result-value {
    font-weight: bold;
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* 连击提示 */
.combo-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 32px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
    z-index: 999;
    animation: comboAnimation 1s ease;
    pointer-events: none;
}

@keyframes comboAnimation {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .game-container {
        flex-direction: column;
    }
    
    .game-sidebar {
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .game-tile {
        font-size: 24px;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

